﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using ARR.Entities;

namespace ARR.Services
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IRangeReviewsService" in both code and config file together.
    [ServiceContract]
    public interface IRangeReviewsService
    {
        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        List<RangeReview> GetAll(int countryId, bool lazyLoad);

        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        RangeReview GetById(int rangeReviewId, bool lazyLoad);

        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        RangeReview GetByTitle(string title, int countryId, bool lazyLoad);

        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        List<RangeReviewBenchmark> GetRangeReviewBenchmarks(int rangeReviewId);

        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        List<RangeReviewSetup> GetRangeReviewSetups(int rangeReviewId, int categoryId);
        
        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        void SaveAll(List<RangeReview> rangeReviews);

        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        RangeReviewStore GetRangeReviewSameStore(int rangeReviewId);

        [OperationContract]
        [FaultContract(typeof(ARRExceptionDetail))]
        RangeReview SaveNewAndGetIt(RangeReview rangeReview);
    }
}
